﻿using Domain;
using Domain.Entity;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.AppService.ERAppService
{
	public class ERAppService:IERAppService
	{
		private readonly IERRepository eRRepository;

		public ERAppService(IERRepository eRRepository)
		{
			this.eRRepository = eRRepository;
		}

		public Task<bool> AddERAsync(ER er)
		{
			return eRRepository.AddERAsync(er);
		}

		public ERFenYE DateERSSAsync(string HumanMajorKindId, string HumanMajorId, string gzc, DateTime startDate, DateTime endDate, int page, int pageSize,int zt,int zt1)
		{
			return eRRepository.DateERSSAsync(HumanMajorKindId, HumanMajorId, gzc, startDate, endDate, page, pageSize,zt,zt1);
		}

		public ERFenYE DateERSAsync(int page, int pageSize, int zt)
		{
			return eRRepository.DateERSAsync(page, pageSize, zt);
		}

		public Task<bool> DeleteERAsync(int id)
		{
			return eRRepository.DeleteERAsync(id);
		}

		public Task<ER> GetERByNameAsync(int id)
		{
			return eRRepository.GetERByNameAsync(id);
		}

		public Task<bool> UpdateERAsync(ER er)
		{
			return eRRepository.UpdateERAsync(er);
		}

		public Task<bool> UpdateERApplicationAsync(ER er)
		{
			return eRRepository.UpdateERApplicationAsync(er);
		}

		public Task<bool> UpdateERSAsync(ER er)
		{
			return eRRepository.UpdateERSAsync(er);
		}

		public Task<bool> UpdateERApprovalAsync(ER er)
		{
			return eRRepository.UpdateERApprovalAsync(er);
		}
		public ERFenYE DateERAsync(string HumanMajorKindId, string HumanMajorId, string gzc, DateTime startDate, DateTime endDate, int page, int pageSize, int zt)
		{
			return eRRepository.DateERAsync(HumanMajorKindId, HumanMajorId, gzc, startDate, endDate, page, pageSize, zt);
		}
	}
}
